<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>ASVisibilityDepth Protocol Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">  </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">Texture</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/visibilityDepth">- visibilityDepth</option>
		
		<option value="//api/name/visibilityDepthDidChange">- visibilityDepthDidChange</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">ASVisibilityDepth Protocol Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Conforms to</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>ASVisibilityProtocols.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>ASVisibilityDepth</p><p>&ldquo;Visibility Depth&rdquo; represents the number of user actions required to make an ASDisplayNode or
ASDKViewController visibile. Texture uses this information to intelligently manage memory and focus
resources where they are most visible to the user.</p>

<p>The ASVisibilityDepth protocol describes how custom view controllers can integrate with this system.</p>

<p>Parent view controllers should also implement @c ASManagesChildVisibilityDepth</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/visibilityDepth" title="visibilityDepth"></a>
	<h3 class="method-title"><code><a href="#//api/name/visibilityDepth">&ndash;&nbsp;visibilityDepth</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Visibility depth</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NSInteger)visibilityDepth</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>Represents the number of user actions necessary to reach the view controller. An increased visibility
depth indicates a higher number of user interactions for the view controller to be visible again. For example,
an onscreen navigation controller&rsquo;s top view controller should have a visibility depth of 0. The view controller
one from the top should have a visibility deptch of 1 as should the root view controller in the stack (because
the user can hold the back button to pop to the root view controller).</p>

<p>Visibility depth is used to automatically adjust ranges on range controllers (and thus free up memory) and can
be used to reduce memory usage of other items as well.</p>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">ASVisibilityProtocols.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/visibilityDepthDidChange" title="visibilityDepthDidChange"></a>
	<h3 class="method-title"><code><a href="#//api/name/visibilityDepthDidChange">&ndash;&nbsp;visibilityDepthDidChange</a></code>
<span class="task-item-suffix">required method</span></h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Called when visibility depth changes</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)visibilityDepthDidChange</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<p>@c visibilityDepthDidChange is called whenever the visibility depth of the represented view controller
has changed.</p>

<p>If implemented by a view controller container, use this method to notify child view controllers that their view
depth has changed @see ASDKNavigationController.m</p>

<p>If implemented on an ASDKViewController, use this method to reduce or increase the resources that your
view controller uses. A higher visibility depth view controller should decrease it&rsquo;s resource usage, a lower
visibility depth controller should pre-warm resources in preperation for a display at 0 depth.</p>

<p>ASDKViewController implements this method and reduces / increases range mode of supporting nodes (such as ASCollectionNode
and ASTableNode).</p>
			</div>
			

			

			
			<div class="method-subsection see-also-section">
				<h4 class="method-subtitle">See Also</h4>
				<ul>
					
					<li><code><p><a href="#//api/name/visibilityDepth">- visibilityDepth</a></p></code></li>
					
				</ul>
			</div>
			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">ASVisibilityProtocols.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2016 AsyncDisplayKit. All rights reserved. Updated: 2016-11-05</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>